package part03_工厂模式.p04_抽象工厂模式;

/**
 * @ClassName: BJFactory
 * @Author: AllenSun
 * @Date: 2020/3/12 23:09
 */ //这是工厂子类
class BJFactory implements AbsFactory {

    @Override
    public Pizza04 createPizza(String orderType) {
        System.out.println("使用的是抽象工厂模式");
        Pizza04 pizza04=null;
        if(orderType.equals("cheese")){
            pizza04=new BJCheesePizza();
        } else if(orderType.equals("pepper")){
            pizza04=new BJPepperPizza();
        }
        return pizza04;
    }
}
